import docx from "@assets/docx.svg";
import pdf from "@assets/pdf.svg";
import zip from "@assets/ZIP.svg";
import jpg from "@assets/jpg.svg";
import png from "@assets/png.svg";
import mp4 from "@assets/mp4.svg";
import mp3 from "@assets/MP3.svg";

export function iconurl(filename: string) {
  let url;
  switch (filename) {
    case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
      url = docx;
      break;
    case "application/pdf":
      url = pdf;
      break;
    case "application/x-zip-compressed":
      url = zip;
      break;
    case "image/jpeg":
      url = jpg;
      break;
    case "image/png":
      url = png;
      break;
    case "video/mp4":
      url = mp4;
      break;
    default:
      url = mp3;
      break;
  }

  return url;
}
